#!/usr/bin/perl

use strict;
use warnings;
require 'forum_common.pl';

my $sess_id = get_sess_id();
if ($sess_id && connect_to_database())
{
	clear_user_sess($sess_id);
	forum_disconnect();
}

record_this_hit();

print redirect(-status=>303, -location=>(referer() || $forum::root_path),
				-cookie=>cookie(-name=>'forum_sess_id',
								-value=>$sess_id,
								-path=>$forum::root_path,
								-expires=>'-1h'));
